From 5b9a4e6997e9ffe12899d0f9ce7a10804b82befa Mon Sep 17 00:00:00 2001 From: Kristian Rietveld Date: Mon, 20 Oct 2003 21:28:38 +0000 Subject: [PATCH] remove the completion timeout when the user pressed on Enter/ESC. Fixes Mon Oct 20 23:24:27 2003 Kristian Rietveld * gtk/gtkentry.c (gtk_entry_key_press): remove the completion timeout when the user pressed on Enter/ESC. Fixes the bug where the completion popup popped up after the user pressed on Enter (which is just weird). Reported by the Epiphany people (all of them). --- ChangeLog | 7 +++++++ ChangeLog.pre-2-10 | 7 +++++++ ChangeLog.pre-2-4 | 7 +++++++ ChangeLog.pre-2-6 | 7 +++++++ ChangeLog.pre-2-8 | 7 +++++++ gtk/gtkentry.c | 12 ++++++++++++ 6 files changed, 47 insertions(+) diff --git a/ChangeLog b/ChangeLog index 4ec6b36843..9974cde183 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +Mon Oct 20 23:24:27 2003 Kristian Rietveld + + * gtk/gtkentry.c (gtk_entry_key_press): remove the completion + timeout when the user pressed on Enter/ESC. Fixes the bug where the + completion popup popped up after the user pressed on Enter (which is + just weird). Reported by the Epiphany people (all of them). + Mon Oct 20 20:27:22 2003 Soeren Sandmann Add support for OS X like sliding of toolbar items during drag and diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 4ec6b36843..9974cde183 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,10 @@ +Mon Oct 20 23:24:27 2003 Kristian Rietveld + + * gtk/gtkentry.c (gtk_entry_key_press): remove the completion + timeout when the user pressed on Enter/ESC. Fixes the bug where the + completion popup popped up after the user pressed on Enter (which is + just weird). Reported by the Epiphany people (all of them). + Mon Oct 20 20:27:22 2003 Soeren Sandmann Add support for OS X like sliding of toolbar items during drag and diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 4ec6b36843..9974cde183 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,10 @@ +Mon Oct 20 23:24:27 2003 Kristian Rietveld + + * gtk/gtkentry.c (gtk_entry_key_press): remove the completion + timeout when the user pressed on Enter/ESC. Fixes the bug where the + completion popup popped up after the user pressed on Enter (which is + just weird). Reported by the Epiphany people (all of them). + Mon Oct 20 20:27:22 2003 Soeren Sandmann Add support for OS X like sliding of toolbar items during drag and diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 4ec6b36843..9974cde183 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,10 @@ +Mon Oct 20 23:24:27 2003 Kristian Rietveld + + * gtk/gtkentry.c (gtk_entry_key_press): remove the completion + timeout when the user pressed on Enter/ESC. Fixes the bug where the + completion popup popped up after the user pressed on Enter (which is + just weird). Reported by the Epiphany people (all of them). + Mon Oct 20 20:27:22 2003 Soeren Sandmann Add support for OS X like sliding of toolbar items during drag and diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 4ec6b36843..9974cde183 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,10 @@ +Mon Oct 20 23:24:27 2003 Kristian Rietveld + + * gtk/gtkentry.c (gtk_entry_key_press): remove the completion + timeout when the user pressed on Enter/ESC. Fixes the bug where the + completion popup popped up after the user pressed on Enter (which is + just weird). Reported by the Epiphany people (all of them). + Mon Oct 20 20:27:22 2003 Soeren Sandmann Add support for OS X like sliding of toolbar items during drag and diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c index 7576d72872..3e97af9f82 100644 --- a/gtk/gtkentry.c +++ b/gtk/gtkentry.c @@ -1622,6 +1622,18 @@ gtk_entry_key_press (GtkWidget *widget, } } + if (event->keyval == GDK_Return || event->keyval == GDK_ISO_Enter + || event->keyval == GDK_Escape) + { + GtkEntryCompletion *completion = gtk_entry_get_completion (entry); + + if (completion && completion->priv->completion_timeout) + { + g_source_remove (completion->priv->completion_timeout); + completion->priv->completion_timeout = 0; + } + } + if (GTK_WIDGET_CLASS (parent_class)->key_press_event (widget, event)) /* Activate key bindings */ -- 2.30.2